package secondary_classes;
import org.junit.Before;
import org.junit.Test;

/**
 * 
 */

/**
 * @author Rohit
 *
 */
public class _CsvFileReaderTest {

	private static final String TEST_FILE = "tests/CsvTest.csv";
	private static final String FIRST_ITEM = "string 1";
	
	CsvFileReader cfr;
	
	@Before
	public void setUp() {
		try {
			cfr = new CsvFileReader(TEST_FILE);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

//	/**
//	 * Test method for {@link CsvFileReader#getSize()}.
//	 */
//	@Test
//	public void testGetSize() {
//		Assert.assertTrue(cfr.getSize() == NUM_ITEMS);
//	}	
	
	/**
	 * Test method for {@link CsvFileReader#getItem(int)}.
	 */
	@Test
	public void testGetItem() {
		assert(cfr.getItem(0, 0).equals(FIRST_ITEM));
		for (int i = 0; i < cfr.getNumLines(); i++) {
			for (int j = 0; j < cfr.getLine(i).size(); j++) {
				System.out.println(cfr.getItem(i, j));
			}
		}
	}

	

}
